#include <iostream>
using namespace std;

template<typename... T>
auto accum(T... args) {
  return (... + args); // 用+操作符把可变参数“折叠”起来，得到和
}

int main() {
  cout << accum(1, 2, 3, 4, 5) << endl;
}